package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.work.WorkImgBO;
import com.ymk.service.IWorkImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 岗位图片表 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-08-03
 */
@Service
public class WorkImgService implements IWorkImgService {

    @Override
    public WorkImgBO get(Map param) {
    return this.daoRouter.queryForObject("WorkImg.loadWorkImg",param);
    }

    @Override
    public List<WorkImgBO> list(Map param) {
        return this.daoRouter.query("WorkImg.loadWorkImg",param);
    }

    @Override
    public List<WorkImgBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("WorkImg.loadWorkImgForPage",pagination);
    }

    @Override
    public void post(WorkImgBO param) {
        this.daoRouter.insert("AWorkImg.insertWorkImg",param);
    }

    @Override
    public void update(WorkImgBO param) {
        this.daoRouter.update("AWorkImg.updateWorkImg",param);
    }

    @Override
    public void del(WorkImgBO param) {
        this.daoRouter.update("AWorkImg.delWorkImg",param);
    }

    @Override
    public void delete(WorkImgBO param) {
        this.daoRouter.query("WorkImg.delete",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
